import React from 'react';
import {connect} from 'react-redux';
import CardList from '../pages/CardList';
import {
  NavigatorIOS,
} from 'react-native';

class CardListContainer extends React.Component {
    render() {
        return (
        	<NavigatorIOS
        		initialRoute={{
        			title: '居游卡', 
        			component: CardList,
        			passProps: { ...this.props },
        			leftButtonTitle : this.props.leftButtonTitle,
        			//leftButtonIcon : require('../imgs/t1.png'),
        			onLeftButtonPress : () => {
        				this.props.navigator.pop();
        			}
        		}}
	            style={{flex: 1}}
	            // barTintColor='#996699'
	            // titleTextColor="#ffffff"
	            // tintColor="#ffffff"
	        />
        )
    }
}

export default connect((state) => {
    const { homepageReducer } = state;
    return {
        homepageReducer
    }
})(CardListContainer);